using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using DATAMODELLib;
using GPSOBJECTSLib;
using GPSDOCDOTNETLib;

namespace SharpGPS
{
    public partial class Form1 : Form
    {
        private static string dir = "k:\\ProgramDesign\\Projects\\GPS\\GPSObjects Model XML\\";
        private static string confPath = dir + "DataObjectConfig.xml";
        private static string szDocumentPath = dir + "0707.xml";
        
        public Form1()
        {
            InitializeComponent();

            DocumentDotNetClass doc = new DocumentDotNetClass();
            doc.LoadDocument(confPath, szDocumentPath);


            FileStream fs = File.Open(confPath, FileMode.Open);
            StreamReader sr = new StreamReader(fs);

            string strConfig = sr.ReadToEnd();

            DataObjectFactory df = new DataObjectFactory();
            df.ConfigXML = strConfig;

            string rnxPath = "k:\\ProgramDesign\\Data\\0707\\GNSSPro Files\\07011720.rnx";
            CoRinexClass rnx = new CoRinexClass();
            rnx.LoadRNXFile(rnxPath);

            IXML toXml = (IXML)rnx;
            string xml = toXml.toXml();

            CoDocument doc2 = new CoDocument();
            doc2.LoadWorkSpace("k:\\ProgramDesign\\Data\\0707.wsp");
        }
    }
}